<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>地图展示</title>
  <style>
    body, html, #allmap {
      width: 100%;
      height: 100%;
      overflow: hidden;
      margin: 0;
      font-family: "微软雅黑";
    }
  </style>
  <script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=G1LFyjrNGIkns5OfpZnrCGAKxpycPLwb"></script>
</head>
<body>
  <div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
  let map = new BMapGL.Map("allmap"); // 创建Map实例
  let point = new BMapGL.Point(116.404, 39.915); // 初始化中心坐标
  map.centerAndZoom(point, 12); //初始化地图，设置中心点坐标和地图级别
  map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放

  // tips：百度地图的绘图流程是怎样的?
  /*
    1.引入js库，注意需要附带申请的密钥ak
    2.编写容器组件
    3.初始化Map对象
    4.初始化Point对象
    5.设置中心点和地图级别
  */
</script>